package topic

import (
	"company_website/src/api"
	"github.com/gin-gonic/gin"
)

type Topic struct {
}

func (t *Topic) InitRouter(router *gin.RouterGroup) {
	topic := router.Group("topicDetails")
	{
		topic.GET("getThreeTopic", api.Topic.GetThreeTopic)
		topic.GET("getTopicDetails", api.Topic.GetTopicDetailsById)
		topic.GET("getPageTopic", api.Topic.GetPageTopic)
		topic.GET("categoryTopic", api.Topic.GetTopicByCategory)
		topic.GET("getTopicByTitle", api.Topic.GetTopicByTitle)
	}
	change := router.Group("topicChange")
	{
		change.POST("AddTopic", api.Topic.AddTopic)
		change.PUT("ModifyTopic", api.Topic.ModifyTopic)
		change.DELETE("DeleteTopic", api.Topic.DeleteTopic)
		change.PUT("ReleaseTopic", api.Topic.ReleaseTopic)
	}
}
